package org.blogwu.learn.designpattern.建造结合责任链.handle;

import org.apache.commons.lang3.StringUtils;
import org.blogwu.learn.designpattern.建造结合责任链.Member;

public class ValidateHandler extends Handler {

    public void doHandler(Member member) {
        if (StringUtils.isEmpty(member.getLoginName()) ||
                StringUtils.isEmpty(member.getLoginPass())) {
            System.out.println("用户名和密码为空");
            return;
        }
        System.out.println("用户名和密码不为空，可以往下执行");
        if (next != null) {
            next.doHandler(member);
        }
    }

}
